package com.example.elastic;

import com.example.elastic.document.User;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.data.elasticsearch.core.ElasticsearchOperations;

/**
 * @author zxs
 * @since 2022/4/7
 */
@SpringBootApplication
public class EsApplication {

    private ElasticsearchOperations operations;

    public static void main(String[] args) {
        SpringApplication.run(EsApplication.class,args);

    }

    public void save(){
        User user = new User();

        operations.save(user);
    }


}
